package com.twu.biblioteca.menu;

import com.twu.biblioteca.Book;
import com.twu.biblioteca.Library;
import com.twu.biblioteca.menuitem.BookListMenuItem;
import com.twu.biblioteca.menuitem.MenuItem;

import java.io.PrintWriter;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: twer
 * Date: 5/23/13
 * Time: 8:57 AM
 * To change this template use File | Settings | File Templates.
 */
public class BookListMenu extends Menu {


    public BookListMenu(Library lib, PrintWriter printWriter) {
        super(printWriter);
        for(Book book : lib.getBooks()){
            this.addMenuItem(new BookListMenuItem(book.getName(), lib, printWriter));
        }
    }

    @Override
    public void show() {
        printWriter.println("Enter book name to reserve:");
        super.show();
    }

}
